package com.yuanfengPlus.purchase.controller;



import com.yuanfengPlus.purchase.entity.PurchaseReturn;
import com.yuanfengPlus.purchase.service.IPurchaseReturnService;
import com.yuanfengPlus.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping(value = "/purchaseReturn")
public class PurchaseReturnController {
    @Autowired
    private IPurchaseReturnService iprs;
    @GetMapping("/queryPurchaseReturn")
    public Result<List<PurchaseReturn>> queryPurchaseReturn(@RequestBody Map<String, Object> params){
        return iprs.queryPurchaseReturn(params);
    }
    @PostMapping("/addPurchaseReturn")
    public Result<String> addPurchaseReturn(@RequestBody PurchaseReturn PurchaseReturn){
        return iprs.addPurchaseReturn(PurchaseReturn);
    }
    @GetMapping("/queryPurchaseReturnById")
    public Result<PurchaseReturn> queryPurchaseReturnById(@RequestBody String purchase_return_id){
        return iprs.queryPurchaseReturnById(purchase_return_id);
    }
    @PostMapping("/updatePurchaseReturnById")
    public Result<String> updatePurchaseReturnById(@RequestBody PurchaseReturn PurchaseReturn){
        return iprs.updatePurchaseReturnById(PurchaseReturn);
    }
    @PostMapping("/deletePurchaseReturn")
    public Result<String> deletePurchaseReturn(String purchase_return_id){
        return iprs.deletePurchaseReturn(purchase_return_id);
    }
    @PostMapping("/updatePurchaseReturnAgree")
    public Result<String> updatePurchaseReturnAgree(String purchase_return_id){
        System.out.println(purchase_return_id);
        return iprs.updatePurchaseReturnAgree(purchase_return_id);
    }
    @PostMapping("/updatePurchaseReturnRefuse")
    public Result<String> updatePurchaseReturnRefuse(String purchase_return_id){
        System.out.println(purchase_return_id);
        return iprs.updatePurchaseReturnRefuse(purchase_return_id);
    }

}
